﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using System;
using System.Collections.Generic;
using System.Text;

namespace Aliang.EventBus.IntegrationEventLogEF
{
    class OracleIntegrationEventLogContextDesignTimeFactory : IDesignTimeDbContextFactory<OracleIntegrationEventLogContext>
    {
        public OracleIntegrationEventLogContext CreateDbContext(string[] args)
        {
            var optionsBuilder = new DbContextOptionsBuilder<OracleIntegrationEventLogContext>();

            optionsBuilder.UseOracle(".", options => options.MigrationsAssembly(GetType().Assembly.GetName().Name));

            return new OracleIntegrationEventLogContext(optionsBuilder.Options);
        }
    }
}
